# make file made by GWB33

# make file made by gnu make

# macro definitions for target file

TARGET= boot2

# macro definitions for tools & dir
# GNU33V410
TOOL_DIR = C:/EPSON/GNU33
CC= $(TOOL_DIR)/xgcc
AS= $(TOOL_DIR)/xgcc
LD= $(TOOL_DIR)/ld
OBJDUMP = $(TOOL_DIR)/objdump
RM= $(TOOL_DIR)/rm
LIB_DIR= $(TOOL_DIR)/lib/std
SRC_DIR= .

# macro definitions for tool flags

#  -funsigned-char
CFLAGS= -B$(TOOL_DIR)/ -c -fno-builtin -mgda=0 -mdp=1 -O1 -I$(TOOL_DIR)/include -IC:/Users/John/Documents/s1c33_workbench/include
ASFLAGS= -B$(TOOL_DIR)/ -c -xassembler-with-cpp -Wa,--gstabs
LDFLAGS= -T $(TARGET).lds -Map $(TARGET).map -N

# macro definitions for object flags

OBJS= main.o \

OBJLDS= 

# macro definitions for library flags

LIBS= $(LIB_DIR)/libc.a $(LIB_DIR)/libgcc.a


# dependency list start

### src definition start
SRC1_DIR= .
### src definition end

$(TARGET).elf : $(OBJS) $(TARGET).mak $(TARGET).lds
	$(LD) $(LDFLAGS) -o $@ $(OBJS) $(OBJLDS) $(LIBS)
	$(OBJDUMP) -D $@

## main.c
main.o : $(SRC1_DIR)/main.c
	$(CC) $(CFLAGS) $(SRC1_DIR)/main.c

# dependency list end


# clean files except source

clean:
	$(RM) -f $(OBJS) $(TARGET).exe $(TARGET).elf $(TARGET).map $(TARGET).bin

